package damngoodcoffee.smart;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class SmartRunner {
    /**
     * @param args
     */
    public static void main(String[] args) {
	if (args.length != 1) {
	    System.out.println("There are too few or too many arguments.\n");
	    System.exit(-1);
	}

	Injector injector = Guice.createInjector(new SmartModule());
	Test test = injector.getInstance(Test.class);
	try {
	    test.execute(args[0]);
	    System.exit(0);
	} catch (TestException e) {
	    e.printStackTrace();
	}
	System.exit(-1);
    }

}
